import java.util.*;


public class Dlist {

	/**
	 * @param args
	 */
	HashMap<String, Sexpr> dlist;
	public Dlist()
	{
		this.dlist = new HashMap<String, Sexpr> ();		
	}
	public int addFunction(String name, Sexpr sexprFunction)
	{
		if(this.dlist.containsKey(name) == true)
			return -1;// Avoid double define functions
		else
		{
			sexprFunction.isID = true;
			sexprFunction.isNumber = false;
			sexprFunction.isAtom =false;
			sexprFunction.isNIL = false;
			this.dlist.put(name, sexprFunction);			
		}
		return 0;
	}
	public Sexpr getFunction(String name)
	{
		Sexpr sexpr = this.dlist.get(name);
		return sexpr;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
